package com.epam.task.web.service.command;

import com.epam.task.web.service.AbstractAction;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * User: zhunusbekova.arailym
 */
public class RedirectAction extends AbstractAction {

    @Override
    public String perform(HttpServletRequest request, HttpServletResponse response) {
        String url = request.getParameter("url");
        String locale = request.getParameter("locale");
        request.getSession().setAttribute("locale", locale);

        return url;
    }

}